package ch8.Phone;
//功能机
public class CommonHandSet extends Phone {
    private double price;//价格

    public CommonHandSet(String brand, String type, double price) {
        super(brand, type);
        this.price = price;
    }

    public void show() {
        System.out.println("这个功能机的品牌是："+this.getBrand()+",型号是："+
                this.getType()+",价格是："+this.price+"元。它只有2个功能：");
        this.call();
        this.messages();
    }

    @Override
    public void call() {
        System.out.println("打电话。");
    }

    @Override
    public void messages() {
        System.out.println("发短信。");
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

}
